package com.qianyu.project.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qianyu.project.entity.Budget;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Repository
public interface BudgetMapper extends BaseMapper<Budget> {
    @Select("select max(ys_id) from budget where year(create_date)=year(curdate())")
    String selectMaxCode();
    @Select("select b.*,pi.project_name,e.name from budget b,project_info pi,emp e where b.p_id=pi.id and b.e_id=e.id and b.i=#{value}")
    Budget listTo(String id);
}
